"use strict"
/** @param {import("egg").Application} app */
module.exports = app => {
	const Sequelize = app.Sequelize
	const sequelize = app.model

	let leaderboard = sequelize.define("leaderboard", {
		id: {
			type: Sequelize.INTEGER,
			comment: " 当前用户的id",
			primaryKey: true
		},
		avatar: {
			type: Sequelize.STRING,
		},
		total_coin: {
			type: Sequelize.DOUBLE
		},
		nickName: {
			type: Sequelize.STRING(50)
		}
	}, {
		createdAt: true,
		tableName: "empire_leader_board",
		timestamps: false,

	})
	// leaderboard.sync({alter: true})
	return leaderboard
}